<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <meta charset="utf-8"></meta>
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"></meta>
        <title>DISUTRAN S.A</title>       
        <link rel="stylesheet" href="#{facesContext.externalContext.requestContextPath}/Estilos/LogIn.css"></link>

    </h:head>
    <h:body>
        <center>            
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            <p><img src="#{facesContext.externalContext.requestContextPath}/Imagenes/logo.png" width="438" height="312"  alt=""/></p>                        
        </center>            
        <h:form id="frmLogin" styleClass="login">
            <p>
                <h:outputLabel for="txtCorreo">Correo:</h:outputLabel>
                <h:inputText id="txtCorreo" value="#{logBean.usuario.email}"
                             required="true" requiredMessage="El mail es requerido"
                             validatorMessage="Debe ingresar un correo válido"
                             >
                    <f:validateRegex
                        pattern="^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$" />
                </h:inputText>
                <h:message for="txtCorreo" errorStyle="color: red" infoStyle="color: green"/>
            </p>
            <p>
                <h:outputLabel for="txtPassword">Contraseña:</h:outputLabel>
                <h:inputSecret id="txtPassword" value="#{logBean.usuario.contrasena}"
                               required="true" requiredMessage="La contraseña es requerida"
                               validatorMessage=""
                               >
                    <f:validateLength minimum="5" maximum="16" for="txtPassword"></f:validateLength>
                </h:inputSecret>
                <h:message for="txtPassword" errorStyle="color: red" infoStyle="color: green"/>
            </p>
            <p class="login-submit">
                <label class="login-button">
                    <h:commandButton id="btnLogin" action="#{logBean.validarSesion()}">

                    </h:commandButton>
                </label>
            </p>               
            <!--<p class="forgot-password"><h:link outcome="forgotPassword" value="¿Olvidó su Contraseña?"/> </p>-->
        </h:form>

    </h:body>
</html>

